sinclude ../../../config.make
#global 包含平台相关的配置，比如 build/config/Linux
include $(POCO_BASE)/build/rules/global
POCO_HOST_OSNAME = $(shell uname)
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))

incdir=$(POCO_BASE)/Foundation/include
pocolib=PocoFoundation

target=test.out
bindir=.
libdir=$(POCO_BASE)/lib/$(POCO_HOST_OSNAME)/$(POCO_HOST_OSARCH)
objdir=../../obj

SOURCES	= $(wildcard *.cpp)
OBJS	= $(SOURCES:.cpp=.o)

$(target):$(OBJS)
	g++ $(objdir)/$(OBJS) -o $@ -l$(pocolib) -L$(libdir) -std=c++11 -Wl,-rpath=$(libdir) 

%.o:%.cpp
	g++ -c -g -I$(incdir) $< -o $(objdir)/$@ -std=c++11

clean:
	-rm $(addprefix $(objdir)/,$(OBJS))
